package com.teen9g.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("advice")
public class Advice implements Serializable {
    @TableId(value = "advice_id", type = IdType.AUTO)
    private Integer adviceId;
    private Integer userId;
    private String adviceCategory; // 建议分类
    private String adviceContent; // 建议内容 限制500字
    private String adviceAuthor; // 建议作者
    private String adviceStatus; // 未优化, 优化中, 已优化, 已删除
    private Integer adviceLike; // 点赞数
    private String adviceRemark; // 管理员备注 创建评论的时候为空
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime adviceCreateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime adviceUpdateTime;
}
